<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="tip">...</div>
    <button>显示内容</button>
    <button>变化颜色</button>
    <button>改变字体</button>

    <script>
        var tip=document.getElementById('tip')
        var btns=document.getElementsByTagName('button')
        console.log(btns)
        btns[0].onclick=function(){
            tip.innerHTML='<b>你好</b>'
        }
        btns[1].onclick=function(){
            tip.style.color='red'
        }
        btns[2].onclick=function(){
            tip.style.fontSize='20px'
        }
    </script>
</body>
</html>